package com.zm.springcloudsentinel.service.impl;

import com.zm.springcloudsentinel.service.AsyncService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncServiceImpl implements AsyncService {
    @Override
    @Async
    public void doAsync() {
        try {
            Thread.sleep(3000);
            System.err.println("异步执行");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
